Image capturing apparatus, image forming apparatus, distance measuring method, and computer-readable recording medium

ABSTRACT

An image capturing apparatus includes: a casing having an opening; a light source arranged inside the casing; a sensor arranged inside the casing and configured to capture, through the opening, an image of an object present outside the casing while the light source is on; and a distance calculator to calculate a distance between the casing and the object, based on an image that has been captured by the sensor and contains, within an image region of the object defined by the opening, a high-luminance region and low-luminance regions located more outside than the high-luminance region.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims priority under 35 U.S.C. § 119 toJapanese Patent Application No. 2015-116703 filed in Japan on Jun. 9,2015 and Japanese Patent Application No. 2016-083877 filed in Japan onApr. 19, 2016. The contents of which are incorporated herein byreference in their entirety.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to an image capturing apparatus, an imageforming apparatus, a distance measuring method, and a computer-readablerecording medium.

2. Description of the Related Art

Conventionally known image capturing apparatuses include those thatcapture an image of a color pattern formed by an image forming apparatuson a recording medium using coloring material such as ink, convert RGBvalues of the color pattern that are obtained from the image capturinginto color specification values (colorimetric values) in a standardcolor space, and output the color specification values (refer to, forexample, Japanese Patent Application Laid-open No. 2014-181907).Colorimetric values of a color pattern that are output from an imagecapturing apparatus of this type are used, for example, for coloradjustment in an image forming apparatus. Color adjustment in an imageforming apparatus can be carried out by, instead of converting RGBvalues into colorimetric values, using RGB values of a color patternthat are obtained from image capturing.

The image capturing apparatus of this type carries out the imagecapturing while irradiating, with light from a light source providedinside a casing, an object (the color pattern formed on a recordingmedium) present outside the casing. Consequently, the intensity of lightwith which the object is irradiated varies depending on the distancebetween the casing and the object, and RGB values obtained from theimage capturing may be therefore unstable. Given this situation, animage capturing apparatus disclosed in Japanese Patent ApplicationLaid-open No. 2014-181907 is configured to be able to measure thedistance between a casing and an object present outside the casing.Specifically, the image capturing apparatus disclosed in Japanese PatentApplication Laid-open No. 2014-181907 has a mark portion for distancemeasurement provided on a light-permeable member arranged between alight source and the object, and is configured to measure the distancebetween the casing and the object based on an image of a shadow of themark portion that is obtained from the image capturing.

However, a distance measuring method employed by the image capturingapparatus disclosed in Japanese Patent Application Laid-open No.2014-181907 involves a cumbersome process of providing the mark portionfor distance measurement to the light-permeable member. For this reason,a technique is desired that enables easier measurement of the distancebetween a casing and an object.

SUMMARY OF THE INVENTION

It is an object of the present invention to at least partially solve theproblems in the conventional technology.

According to exemplary embodiments of the present invention, there isprovided an image capturing apparatus comprising: a casing having anopening; a light source arranged inside the casing; a sensor arrangedinside the casing and configured to capture, through the opening, animage of an object present outside the casing while the light source ison; and a distance calculator to calculate a distance between the casingand the object, based on an image that has been captured by the sensorand contains, within an image region of the object defined by theopening, a high-luminance region and low-luminance regions located moreoutside than the high-luminance region.

Exemplary embodiments of the present invention also provide an imageforming apparatus comprising the above-described image capturingapparatus.

Exemplary embodiments of the present invention also provide a distancemeasuring method to be performed by an image capturing apparatusincluding a casing having an opening, a light source arranged inside thecasing, and a sensor arranged inside the casing and configured tocapture, through the opening, an image of an object present outside thecasing while the light source is on, the distance measuring methodcomprising: calculating a distance between the casing and the object,based on an image that has been captured by the sensor and contains,within an image region of the object defined by the opening, ahigh-luminance region and low-luminance regions located on outer sidesof the high-luminance region.

Exemplary embodiments of the present invention also provide anon-transitory computer-readable recording medium that contains acomputer program for causing an image capturing apparatus to implement afunction, the image capturing apparatus including a casing having anopening, a light source arranged inside the casing, and a sensorarranged inside the casing and configured to capture, through theopening, an image of an object present outside the casing while thelight source is on, the function comprising: calculating a distancebetween the casing and the object, based on an image that has beencaptured by the sensor and contains, within an image region of theobject defined by the opening, a high-luminance region and low-luminanceregions located on outer sides of the high-luminance region.

The above and other objects, features, advantages and technical andindustrial significance of this invention will be better understood byreading the following detailed description of presently preferredembodiments of the invention, when considered in connection with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a see-through perspective view illustrating the inside of animage forming apparatus according to an embodiment of the presentinvention;

FIG. 2 is a top view illustrating the mechanical configuration of theinside of the image forming apparatus;

FIG. 3 is a diagram illustrating an example arrangement of recordingheads installed in a carriage installed in the image forming apparatus;

FIG. 4 is a perspective view illustrating the external appearance of acolorimetric camera attached on the carriage;

FIG. 5 is an exploded perspective view of the colorimetric camera;

FIG. 6 is a vertical sectional view of the colorimetric camera takenalong the X1-X1 line in FIG. 4;

FIG. 7 is a vertical sectional view of the colorimetric camera takenalong the X2-X2 line in FIG. 4;

FIG. 8 is a diagram illustrating a specific example of a referencechart;

FIG. 9 is a block diagram illustrating an example configuration of acontrol mechanism for the image forming apparatus;

FIG. 10 is a block diagram illustrating an example functionalconfiguration of the colorimetric camera;

FIG. 11 is a view illustrating an example image captured by a sensorunit;

FIG. 12 is a view illustrating another example image captured by thesensor unit;

FIG. 13 is a view illustrating another example image captured by thesensor unit;

FIG. 14 is a diagram explaining a method for calculating a distancebased on the ratio of the size of a low-luminance region to the size ofa high-luminance region;

FIG. 15 is a diagram explaining the method for calculating a distancebased on the ratio of the size of a low-luminance region to the size ofa high-luminance region;

FIG. 16 is a diagram explaining the method for calculating a distancebased on the ratio of the size of a low-luminance region to the size ofa high-luminance region;

FIG. 17 is a flowchart illustrating the procedure of distancemeasurement that the colorimetric camera performs;

FIG. 18 is a block diagram illustrating an example functionalconfiguration of a colorimetric camera according to a modification ofthe embodiment;

FIG. 19 is a diagram explaining a method for calculating a tilt based onthe ratio of the size of a low-luminance region to the size of ahigh-luminance region;

FIG. 20 is an external view of an electrophotographic image formingapparatus configured as a production printer;

FIG. 21 is a diagram explaining an example arrangement of colorimetriccameras in an electrophotographic image forming apparatus;

FIG. 22 is a diagram explaining disadvantages involved when a pluralityof colorimetric cameras simultaneously calculate distances or tilts;

FIG. 23 is a diagram explaining an example of a case where a pluralityof colorimetric cameras, one after another in sequence, calculatedistances or tilts;

FIG. 24 is a diagram explaining an example of a case where a pluralityof colorimetric cameras not adjacent to each other simultaneouslycalculate distance or tilts; and

FIG. 25 is a diagram explaining an example of a case where firstcolorimetric cameras and second colorimetric cameras alternatelycalculate distances or tilts, the first colorimetric cameras beingidentified with odd numbers in the arrangement sequence of thecolorimetric cameras, the second colorimetric cameras being identifiedwith even numbers in the arrangement sequence.

The accompanying drawings are intended to depict exemplary embodimentsof the present invention and should not be interpreted to limit thescope thereof. Identical or similar reference numerals designateidentical or similar components throughout the various drawings.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the presentinvention. As used herein, the singular forms “a”, “an” and “the” areintended to include the plural forms as well, unless the context clearlyindicates otherwise. In describing preferred embodiments illustrated inthe drawings, specific terminology may be employed for the sake ofclarity. However, the disclosure of this patent specification is notintended to be limited to the specific terminology so selected, and itis to be understood that each specific element includes all technicalequivalents that have the same function, operate in a similar manner,and achieve a similar result.

An embodiment of the present invention will be described in detail belowwith reference to the drawings.

The following describes an image capturing apparatus, an image formingapparatus, a distance measuring method, and a computer-readablerecording medium having a computer program according to an embodiment ofthe present invention in detail with reference to the accompanyingdrawings. Although the following embodiment takes an inkjet printer asan example of the image forming apparatus to which the present inventionis applied, the present invention is widely applicable to image formingapparatuses of various types that print images on recording media.

Mechanical Configuration of Image Forming Apparatus

First, the mechanical configuration of an image forming apparatus 100according to the present embodiment is described with reference to FIG.1 to FIG. 3. FIG. 1 is a see-through perspective view illustrating theinside of the image forming apparatus 100, FIG. 2 is a top viewillustrating the mechanical configuration of the inside of the imageforming apparatus 100, and FIG. 3 is a diagram illustrating an examplearrangement of recording heads 6 installed in a carriage 5.

As illustrated in FIG. 1, the image forming apparatus 100 according tothe present embodiment includes the carriage 5 that reciprocates along amain-scanning direction (the arrow A directions in the drawing). Thecarriage 5 is supported by a main guide rod 3 extending in themain-scanning direction. The carriage 5 includes a connecting piece 5 a.The connecting piece 5 a engages with a sub guide member 4 providedparallel to the main guide rod 3 and stabilizes the attitude of thecarriage 5.

The carriage 5 has recording heads 6 y, 6 m, 6 c, and 6 k installedtherein, as illustrated in FIG. 2. The recording head 6 y is a recordinghead that ejects yellow (Y) ink. The recording head 6 m is a recordinghead that ejects magenta (M) ink. The recording head 6 c is a recordinghead that ejects cyan (C) ink. The recording head 6 k is a recordinghead that ejects black (Bk) ink. These recording heads 6 y, 6 m, 6 c,and 6 k are hereinafter collectively referred to as recording heads 6,as appropriate. The recording heads 6 are supported by the carriage 5 insuch a manner that ink ejection surfaces (nozzle surfaces) thereof facedownward (toward a recording medium M).

Cartridges 7 provided as ink supplying members for supplying ink to therespective recording heads 6 are not installed in the carriage 5 but arearranged at a certain position within the image forming apparatus 100.The cartridges 7 are coupled to the recording heads 6 through pipes, sothat the ink is supplied from the cartridges 7 to the recording heads 6through the pipes.

The carriage 5 is coupled to a timing belt 11 stretched between a drivepulley 9 and a driven pulley 10. The drive pulley 9 rotates when amain-scanning motor 8 drives. The driven pulley 10 has a mechanism toadjust the distance to the drive pulley 9 and functions to give certaintension to the timing belt 11. When the main-scanning motor 8 drives,the timing belt 11 is moved forward to cause the carriage 5 toreciprocate in the main-scanning direction. As illustrated in FIG. 2,for example, the movement of the carriage 5 in the main-scanningdirection is controlled based on an encoder value obtained by having amark of an encoder sheet 14 detected by an encoder sensor 13 provided inthe carriage 5.

The image forming apparatus 100 according to the present embodimentincludes a maintenance mechanism 15 for maintaining the reliability ofthe recording heads 6. The maintenance mechanism 15 performs, forexample, cleaning and capping of the ejection surfaces of the recordingheads 6 and discharge of excess ink from the recording heads 6.

As illustrated in FIG. 2, a platen 16 is arranged at a position facingthe ejection surfaces of the recording heads 6. The platen 16 supportsthe recording medium M when the recording heads 6 eject ink onto therecording medium M. The recording medium M is held between conveyingrollers that are driven by a sub-scanning motor 12 to be described later(refer to FIG. 9) and is intermittently conveyed on the platen 16 in asub-scanning direction.

The recording heads 6 eject ink onto the recording medium M on theplaten 16, thereby forming an image on the recording medium M. In thepresent embodiment, in order to secure an ample width of an image thatcan be formed by one scanning of the carriage 5, upstream side recordingheads 6 and downstream side recording heads 6 are installed in thecarriage 5 as illustrated in FIG. 3. The number of recording heads 6 kthat eject black ink installed in the carriage 5 is twice as many aseach of the numbers of recording heads 6 y, recording heads 6 m, andrecording heads 6 c that eject color ink. The recording heads 6 y arearranged laterally separated from each other, and the recording heads 6m are arranged laterally separated from each other. This arrangement isintended to make the superimposing order of colors consistent betweenthe two directions of the reciprocating motion of the carriage 5 toprevent colors from being different between the two directions. Thearrangement of the recording heads 6 illustrated in FIG. 3 is anexample, and the arrangement thereof is not limited to the oneillustrated in FIG. 3.

The components constituting the image forming apparatus 100 according tothe present embodiment are arranged inside an exterior body 1. Theexterior body 1 includes a cover member 2 provided so as to be openableand closable During the maintenance of the image forming apparatus 100or when a paper jam has occurred, the cover member 2 is opened, so thatwork on the components arranged inside the exterior body 1 can beperformed.

The image forming apparatus 100 according to the present embodimentintermittently conveys the recording medium M in the sub-scanningdirection (the arrow B direction in the drawing). During times when itstops conveying the recording medium M in the sub-scanning direction,the image forming apparatus 100 ejects ink from the recording heads 6installed in the carriage 5 onto the recording medium M on the platen 16while moving the carriage 5 in the main-scanning directions, therebyprinting an image on the recording medium M.

In particular, when color adjustment is carried out in the image formingapparatus 100, ink is ejected onto the recording medium M on the platen16 from the recording heads 6 installed in the carriage 5 as illustratedin FIG. 2, so that a color pattern CP is formed, and colorimetry is thenperformed on this color pattern CP. The color pattern CP is an imageactually formed on the recording medium M by the image forming apparatus100 using ink, and reflects characteristics unique to the image formingapparatus 100. Thus, colorimetric values of this color pattern CP can beused for generating or correcting a device profile that describes thecharacteristics unique to the image forming apparatus 100. Performingcolor conversion between a standard color space and eachdevice-dependent color based on the device profile enables the imageforming apparatus 100 to output images with high reproducibility.

The image forming apparatus 100 according to the present embodimentincludes a colorimetric camera (image capturing apparatus) 20 forperforming colorimetry on the color pattern CP formed on the recordingmedium M. As illustrated in FIG. 2, the colorimetric camera 20 issupported by the carriage 5 in which the recording heads 6 areinstalled. The conveyance of the print medium M and the movement of thecarriage 5 cause the colorimetric camera 20 to move over the recordingmedium M having the color pattern CP printed thereon. When havingarrived at a position facing the color pattern CP, the colorimetriccamera 20 captures an image thereof. Based on RGB values of the colorpattern CP obtained from image capturing, the colorimetric values of thecolor pattern CP are calculated. The present embodiment is described byway of an example in which color adjustment in the image formingapparatus 100 is performed using colorimetric values of the colorpattern CP obtained from image capturing that are calculated from RGBvalues of the color pattern CP. However, color adjustment in the imageforming apparatus 100 can alternatively be performed using RGB values ofa color pattern CP obtained from image capturing. In this case, theamounts of ink ejected from the recording heads 6 are adjusted based onthe color adjustment.

Mechanical Configuration of Colorimetric Camera

Next, the mechanical configuration of the calorimetric camera 20according to the present embodiment is described with reference to FIG.4 to FIG. 7. FIG. 4 is a perspective view illustrating the externalappearance of the colorimetric camera 20. FIG. 5 is an explodedperspective view of the colorimetric camera 20. FIG. 6 is a verticalsectional view of the colorimetric camera 20 taken along the X1-X1 linein FIG. 4. FIG. 7 is a vertical sectional view of the colorimetriccamera 20 taken along the X2-X2 line in FIG. 4.

The colorimetric camera 20 includes a casing 21 having a mounting tab 22formed integrally therewith as illustrated in FIG. 4 and FIG. 5. Thecasing 21 has, for example, a bottom plate part 21 a and a top platepart 21 b that face each other with a certain distance therebetween, andside wall parts 21 c, 21 d, 21 e, and 21 f that each interconnect thesebottom plate part 21 a and top plate part 21 b. While the bottom platepart 21 a and the side wall parts 21 d, 21 e, and 21 f of the casing 21are integrally formed, for example, by mold forming together with themounting tab 22, the top plate part 21 b and the side wall part 21 cthereof are configured so as to be detachable. FIG. 5 illustrates astate thereof with the top plate part 21 b and the side wall part 21 cdetached therefrom.

The colorimetric camera 20 is attached to the carriage 5, for example,by being secured to a side surface portion of the carriage 5 with afastening member, such as a screw, with the side wall part 21 e and themounting tab 22 of the casing 21 abutting the side surface portion ofthe carriage 5. In this situation, the colorimetric camera 20 isattached to the carriage 5 so that the bottom plate part 21 a of thecasing 21 can face the recording medium M on the platen 16 while beingsubstantially parallel thereto with a gap d, as illustrated in FIG. 6and FIG. 7. The size of the gap d corresponds to the distance between anobject to be imaged by a sensor unit 25 to be described later and thecasing 21. This distance changes, for example, depending on such factorsas the thickness of the recording medium M and the state ofirregularities on the surface of the platen 16 that supports therecording medium M.

The bottom plate part 21 a of the casing 21, which faces the recordingmedium M on the platen 16, has an opening 23 provided for enabling anobject outside the casing 21 (or the color pattern CP formed on therecording medium M when colorimetry is performed on the color patternCP) to be imaged from the inside of the casing 21. The bottom plate part21 a of the casing 21 also has a reference chart 40 arranged on theinner surface side thereof so as to be aligned next to the opening 23with a supporting member 33 placed therebetween. The reference chart 40is imaged together with the color pattern CP by the sensor unit 25 to bedescribed later when colorimetry is performed on the color pattern CPand when RGB values are acquired. The reference chart 40 is to bedescribed later in detail.

In one side of the inside of the casing 21 that faces the top plate part21 b, a circuit board 24 is arranged. The sensor unit 25 that capturesan image is arranged between the top plate part 21 b of the casing 21and the circuit board 24. The sensor unit 25, as illustrated in FIG. 6,includes a two-dimensional image sensor 25 a such as a charge-coupleddevice (CCD) sensor or a complementary metal-oxide semiconductor (CMOS)sensor, and a lens 25 b that focuses, on a light receiving surface(imaging region) of the two-dimensional image sensor 25 a, an opticalimage of an imaging range of the sensor unit 25.

The sensor unit 25 is held by, for example, a sensor holder 26 formedintegrally with the side wall part 21 e of the casing 21. The sensorholder 26 has a ring part 26 a provided in a position facing a throughhole 24 a provided to the circuit board 24. The ring part 26 a has athrough hole having a size corresponding to the external shape of aprotruding portion of the sensor unit 25 in one side thereof having thelens 25 b. By having the protruding portion in the one side having thelens 25 b inserted through the ring part 26 a of the sensor holder 26,the sensor unit 25 is held by the sensor holder 26 in such a manner thatthe lens 25 b can observe the bottom plate part 21 a of the casing 21through the through hole 24 a in the circuit board 24.

In this situation, an optical axis of the sensor unit 25 indicated bythe dashed-dotted line in FIG. 6 is substantially perpendicular to thebottom plate part 21 a of the casing 21, and the sensor unit 25 is heldby the sensor holder 26 while being aligned thereby so that the opening23 and the reference chart 40 to be described later can be contained inan imaging range. The sensor unit 25 can thus capture, within a part ofthe imaging region of the two-dimensional image sensor 25 a, an image ofan object (the color pattern CP formed on the recording medium M)outside the casing 21 through the opening 23 at the same time ascapturing, within another part of the imaging range of thetwo-dimensional image sensor 25 a, the reference chart 40 arrangedinside the casing 21.

The sensor unit 25 is electrically connected to the circuit board 24having various electronic components mounted thereon, for example,through a flexible cable. The circuit board 24 mounts thereon anexternal connection connector 27, to which a connection cable for use inconnecting the colorimetric camera 20 to a main control board 120 (referto FIG. 9) to be described later of the image forming apparatus 100 isattached.

Inside the casing 21, a light source 28 is also provided for use insubstantially uniformly lighting the imaging range when the sensor unit25 captures an image. For example, a light emitting diode (LED) is usedas the light source 28. In the present embodiment, as illustrated inFIG. 7, two LEDs are used as the light sources 28. The two LEDs arearranged, uniformly with respect to the center of the lens 25 b of thesensor unit 25, in a direction perpendicular to a direction in which theopening 23 and the reference chart 40 are aligned next to each other.

The two LEDs used for the light sources 28 are, for example, mounted ona surface of the circuit board 24 that faces the bottom plate part 21 a.However, the light sources 28 only need to be arranged at positions suchthat the imaging range of the sensor unit 25 can be substantiallyuniformly illuminated with diffusion light, and do not necessarily needto be mounted directly on the circuit board 24. Although an LED is usedas the light source 28 in the present embodiment, the type of the lightsource 28 is not limited to an LED. For example, an organicelectroluminescence (EL) may be used as the light source 28. When anorganic EL is used as the light source 28, illumination light having aspectral distribution similar to that of sunlight is obtained, and thecolorimetric accuracy can be improved.

Inside the casing 21, an optical path length changing member 29 isarranged in an optical path between the sensor unit 25 and an object(the color pattern CP formed on the recording medium M) present outsidethe casing 21, the image of which is captured by the sensor unit 25through the opening 23. The optical path length changing member 29 is anoptical element having sufficient transmittance for light from the lightsources 28 and having a refractive index of n. The optical path lengthchanging member 29 has the function of bringing an imaging plane of anoptical image of the object outside the casing 21 closer to an imagingplane of an optical image of the reference chart 40 inside the casing21. In other words, the colorimetric camera 20 according to the presentembodiment has the optical path length changing member 29 arranged inthe optical path between the sensor unit 25 and the object outside thecasing 21 to change the length of the optical path, so that an imagingplane of an optical image of a patch serving as the object outside thecasing 21 and the imaging plane of an optical image of the referencechart 40 inside the casing 21 are both positioned at the light receivingsurface of the two-dimensional image sensor 25 a of the sensor unit 25.The sensor unit 25 can thus capture images with focuses on both theobject outside the casing 21 and the reference chart 40 inside thecasing 21.

In the optical path length changing member 29, opposite ends of asurface thereof facing the bottom plate part 21 a are supported by apair of ribs 30 and 31, for example, as illustrated in FIG. 6. Inaddition, a pressing member 32 is interposed between a surface of theoptical path length changing member 29 facing the top plate part 21 band the circuit board 24, so that the optical path length changingmember 29 is immobilized after being placed inside the casing 21. Theoptical path length changing member 29 is arranged so as to block theopening 23 in the bottom plate part 21 a of the casing 21, andconsequently has the function of preventing impurities, such as ink mistand dust, that have entered the casing 21 from outside the casing 21through the opening 23 from adhering to such components as the sensorunit 25, the light sources 28, and the reference chart 40.

In colorimetry on the color pattern CP, the colorimetric camera 20according to the present embodiment turns on the light sources 28provided inside the casing 21, and causes the sensor unit 25 to capturean image of the color pattern CP formed on the recording medium Moutside the casing 21, the color pattern CP being irradiated with lightfrom the light sources 28. Consequently, the intensity of light that thecolor pattern CP is irradiated with varies depending on the distancebetween the casing 21 and a recording surface of the recording medium Mhaving the color pattern CP formed thereon (the size of the gap d), andRGB values of the color pattern CP that are obtained from imagecapturing are unstable in some cases. Given this situation, thecolorimetric camera 20 according to the present embodiment has thefunction of calculating the distance between the casing 21 and arecording surface of the recording medium M having the color pattern CPformed thereon, and then correcting, based on the calculated distance,RGB values of the color pattern CP that are obtained from imagecapturing by the sensor unit 25. Functions of the colorimetric camera 20as this function are described later in detail.

The above-described mechanical configuration of the colorimetric camera20 is merely an example, and is not limiting. The colorimetric camera 20according to the present embodiment only needs to be configured at leastto cause the sensor unit 25 provided inside the casing 21 to capture animage of the object outside of the casing 21 through the opening 23while the light sources 28 provided inside the casing 21 are on, and theabove-described configuration thereof can be variously modified andchanged. For example, although the above-described colorimetric camera20 has the reference chart 40 arranged on the inner surface of thebottom plate part 21 a of the casing 21, the colorimetric camera 20 maybe configured in such a manner that, while an opening different from theopening 23 is provided at a position in the bottom plate part 21 a ofthe casing 21 at which the reference chart 40 is to be arranged, thereference chart 40 is attached, at the position having this openingprovided, to the outside of the casing 21. In this case, consequently,the sensor unit 25 captures, through the opening 23, an image of thecolor pattern CP formed on the recording medium M, and captures, throughthe opening different from the opening 23, the reference chart 40attached to the outside of the bottom plate part 21 a of the casing 21.This example is advantageous in that the reference chart 40 can beeasily replaced when being in trouble such as being dirty.

Specific Example of Reference Chart

Next, a specific example of the reference chart 40 arranged in thecasing 21 of the colorimetric camera 20 is described with reference toFIG. 8. FIG. 8 is a diagram illustrating a specific example of thereference chart 40.

The reference chart 40 illustrated in FIG. 8 contains a plurality ofreference patch arrays 41 to 44 in each of which colorimetric referencepatches are arrayed, a dot diameter measuring pattern array 46, adistance measuring line 45, and chart position specifying markers 47.

The reference patch arrays 41 to 44 include: the reference patch array41 in which reference patches of the primary colors of YMCK are arrangedin the order of gray levels; the reference patch array 42 in whichreference patches of the secondary colors of RGB are arranged in theorder of gray levels; the reference patch array 43 in which gray scalereference patches are arranged in the order of gray levels, and thereference patch array 44 in which tertiary color reference patches arearranged. The dot diameter measuring pattern array 46 is a pattern arrayfor geometrical shape measurement in which circular patterns havingdifferent sizes are arranged in the order of size, and can be used formeasuring a dot diameter of an image printed on the recording medium M.

The distance measuring line 45 is formed as a rectangular frame thatsurrounds the reference patch arrays 41 to 44 and the dot diametermeasuring pattern array 46. The chart position specifying markers 47 arearranged at the four corners of the distance measuring line 45 andfunction as markers for use in specifying the positions of therespective reference patches. The position of the reference chart 40 andthe positions of the respective reference patches and patterns can bespecified when the distance measuring line 45 and the chart positionspecifying markers 47 at the four corners are specified from an image ofthe reference chart 40 imaged by the sensor unit 25.

The respective reference patches constituting the colorimetric referencepatch arrays 41 to 44 are used as references of hues reflecting imagingconditions of the colorimetric camera 20. The configuration of thecolorimetric reference patch arrays 41 to 44 arranged on the referencechart 40 is not limited to the example illustrated in FIG. 8, and anydesired reference patch array can be used. For example, a referencepatch that can specify a color range as widely as possible may be used,and the reference patch array 41 of the primary colors of YMCK and thegray scale reference patch array 43 may be formed by patches ofcolorimetric values of ink used in the image forming apparatus 100. Thereference patch array 42 of the secondary colors of RGB may be composedof patches of colorimetric values of colors that can be produced by inkused in the image forming apparatus 100 or may be a reference colorchart, such as Japan Color, that provides defined colorimetric values.

Although the present embodiment uses the reference chart 40 includingthe reference patch arrays 41 to 44 composed of patches each having ageneral patch (color card) shape, the reference chart 40 does notnecessarily need to have such reference patch arrays 41 to 44. Thereference chart 40 only needs to have a plurality of colors usable forcolorimetry arranged so that their respective positions can bespecified.

As described above, the reference chart 40 is arranged so as to bealigned next to the opening 23 on the inner surface side of the bottomplate part 21 a of the casing 21. The sensor unit 25 can thus capture animage of the reference chart 40 at the same time as capturing an imageof the object outside the casing 21. Here, capturing the images at thesame time means acquiring one frame of image data containing the objectoutside the casing 21 and the reference chart 40. In other words,acquiring image data containing the object outside the casing 21 and thereference chart 40 in one frame means capturing the object outside thecasing 21 and the reference chart 40, regardless of time differences inpixel-by-pixel data acquisition.

Schematic Configuration of Control Mechanism for Image Forming Apparatus

Next, a schematic configuration of a control mechanism for the imageforming apparatus 100 according to the present embodiment is describedwith reference to FIG. 9. FIG. 9 is a block diagram illustrating anexample configuration of the control mechanism for the image formingapparatus 100.

As illustrated in FIG. 9, the image forming apparatus 100 according tothe present embodiment includes a central processing unit (CPU) 101, aread only memory (ROM) 102, a random access memory (RAM) 103, arecording head driver 104, a main-scanning driver 105, a sub-scanningdriver 106, a controlling field-programmable gate array (FPGA) 110, therecording heads 6, the colorimetric camera 20, the encoder sensor 13,the main-scanning motor 8, and the sub-scanning motor 12. The CPU 101,the ROM 102, the RAM 103, the recording head driver 104, themain-scanning driver 105, the sub-scanning driver 106, and thecontrolling FPGA 110 are mounted on the main control board 120. Therecording head 6, the encoder sensor 13, and the colorimetric camera 20are mounted on the carriage 5 as described above.

The CPU 101 controls the entire image forming apparatus 100. Forexample, the CPU 101, while using the RAM 103 as a work area, executesvarious control programs stored in the ROM 102 and outputs controlinstructions for controlling various operations in the image formingapparatus 100.

The recording head driver 104, the main-scanning driver 105, and thesub-scanning driver 106 are drivers for driving the recording heads 6,the main-scanning motor 8, and the sub-scanning motor 12, respectively.

The controlling FPGA 110 controls the various operations in the imageforming apparatus 100 in cooperation with the CPU 101. The controllingFPGA 110 includes as functional components, for example, a CPUcontroller 111, a memory controller 112, an ink ejection controller 113,a sensor controller 114, and a motor controller 115.

The CPU controller 111 communicates with the CPU 101, therebytransmitting various types of information acquired by the controllingFPGA 110 to the CPU 101 and receiving control instructions output fromthe CPU 101.

The memory controller 112 performs memory control for enabling the CPU101 to access the ROM 102 and the RAM 103.

The ink ejection controller 113 controls operations of the recordinghead driver 104 in accordance with control instructions from the CPU101, thereby controlling the timing of ink ejection from the recordingheads 6 driven by the recording head driver 104.

The sensor controller 114 performs processing on sensor signals such asan encoder value output from the encoder sensor 13.

The motor controller 115 controls operations of the main-scanning driver105 in accordance with control instructions from the CPU 101, therebycontrolling the main-scanning motor 8 driven by the main-scanning driver105 and controlling the movement of the carriage 5 in the main-scanningdirections. The motor controller 115 controls operations of thesub-scanning driver 106 in accordance with control instructions from theCPU 101, thereby controlling the sub-scanning motor 12 driven by thesub-scanning driver 106 and controlling the movement of the recordingmedium M in the sub-scanning direction on the platen 16.

The above components are examples of control functions implemented bythe controlling FPGA 110, and various control functions in addition tothese may be implemented by the controlling FPGA 110. The whole or partof the above-mentioned control functions may be implemented by computerprograms executed by the CPU 101 or another general-purpose CPU. Part ofthe above control functions may be implemented by dedicated hardware,such as another FPGA other than the controlling FPGA 110 and anapplication specific integrated circuit (ASIC).

The recording heads 6 are driven by the recording head driver 104 theoperations of which are controlled by the CPU 101 and the controllingFPGA 110, and form an image by ejecting ink onto the recording medium Mon the platen 16.

The encoder sensor 13 outputs, to the controlling FPGA 110, an encodervalue obtained by detecting the mark on the encoder sheet 14. Theencoder value is then sent from the controlling FPGA 110 to the CPU 101and is used for, for example, calculating the position and speed of thecarriage 5. Based on the position and speed of the carriage 5 calculatedfrom the encoder value, the CPU 101 generates and outputs controlinstructions for controlling the main-scanning motor 8.

As described above, in color adjustment in the image forming apparatus100, the colorimetric camera 20 causes the sensor unit 25 tosimultaneously capture images of the color pattern CP formed on therecording medium M and the reference chart 40, and then, based on theRGB values of the color pattern CP and the RGB values of respectivereference patches of the reference chart 40 that are obtained from thecaptured images, calculates colorimetric values (which are colorspecification values in a standard color space and, for example, areL*a*b values in an L*a*b color space) of the color pattern CP. Thecolorimetric values of the color pattern CP calculated by thecolorimetric camera 20 are fed to the CPU 101 through the controllingFPGA 110. A method disclosed in Japanese Patent Application Laid-openNo. 2013-051671, for example, can be used as an actual method forcalculating the colorimetric values of the color pattern CP.

The color adjustment in the image forming apparatus 100 can be performedalternatively with the RGB values of the color pattern CP that areobtained in the image capturing, as described above. In this case, thecolorimetric camera 20 causes the sensor unit 25 to simultaneouslycapture the color pattern CP and the reference chart 40, and thenperforms, on the RGB values of the color pattern CP obtained from thecaptured image, a process of correcting errors due to a positional shiftof the light source 28 and other factors by using the RGB values of therespective reference patches of the reference chart 40. The correctedRGB values of the color pattern CP are, for example, fed to the CPU 101from the colorimetric camera 20 through the controlling FPGA 110. TheCPU 101 then adjusts parameters and other items for use in control ofink ejection amounts of the recording heads 6 by using the corrected RGBvalues, so that the amounts of ink ejected from the recording heads 6 tothe recording medium M are adjusted.

Configuration of Control Mechanism of Colorimetric Camera

Next, functions of the colorimetric camera 20 according to the presentembodiment are described with reference to FIG. 10. FIG. 10 is a blockdiagram illustrating an example functional configuration of thecolorimetric camera 20.

As illustrated in FIG. 10, the colorimetric camera 20 includes, inaddition to the above-described sensor unit 25 and light sources 28, alight source drive controller 51, a timing signal generator 52, a framememory 53, an averaging processing unit 54, a first corrector 55, acolorimetric computation unit 56, a non-volatile memory 57, and adistance calculator 58. Each of these units is implemented with the useof, for example, a computer system including a processor and a memory,or dedicated hardware such as an FPGA or an ASIC. Hardware that is usedfor implementing the functions of these units is, for example, mountedon the circuit board 24 arranged inside the casing 21 of thecolorimetric camera 20.

The sensor unit 25 converts into electric signals, through thetwo-dimensional image sensor 25 a, light incident thereto through thelens 25 b, and outputs image data corresponding to an imaging rangeilluminated by the light sources 28. The sensor unit 25 has the built-infunction of AD-converting, through the two-dimensional image sensor 25a, an analog signal obtained by photoelectric conversion into digitalimage data, performing various types of image processing such as shadingcorrection, white balance correction, y correction, and image dataformat conversion on the image data, and outputting the resulting imagedata. Various operating conditions of the two-dimensional image sensor25 a are set in accordance with various setting signals from the CPU101. Part or the whole of the various types of image processing on theimage data may be performed outside the sensor unit 25.

The light source drive controller 51 generates light source drivesignals for turning on the light sources 28 and supplies the signals tothe light sources 28 when the sensor unit 25 captures an image.

The timing signal generator 52 generates a timing signal that controlsthe timing when the sensor unit 25 starts capturing an image, andsupplies the timing signal to the sensor unit 25.

The frame memory 53 temporarily stores therein an image output from thesensor unit 25.

In colorimetry on the color pattern CP, the averaging processing unit 54extracts, from an image output from the sensor unit 25 and temporarilystored in the frame memory 53, an image region (this image region ishereinafter referred to as an “object image region”) defined by theopening 23 of the casing 21 and an image region (this image region ishereinafter referred to as a “reference chart image region”) having animage of the reference chart 40. The averaging processing unit 54 thenaverages image data of a previously determined size of a central regionof the object image region, and outputs the resultant values as the RGBvalues of the color pattern CP. The averaging processing unit 54 alsoaverages image data of regions corresponding to the respective referencepatches within the reference chart image region, and outputs theresultant values as the RGB values of the respective reference patches.The RGB values of the color pattern CP are passed on to the colorimetriccomputation unit 56 after being corrected by the first corrector 55 inaccordance with a distance calculated by the distance calculator 58. Incontrast, the RGB values of the respective reference patches of thereference chart 40 are passed on to the colorimetric computation unit 56without having been corrected by the first corrector 55.

Based on the distance between the casing 21 and the object outside thecasing 21 that has been calculated by the distance calculator 58, thefirst corrector 55 corrects the RGB values of the color pattern CPoutput from the averaging processing unit 54. The above distance is,more specifically, the distance (the size of the gap d illustrated inFIG. 6 and FIG. 7) between the bottom plate part 21 a of the casing 21and a paper surface of the recording medium M that has the color patternCP formed thereon. As described above, a change in the distance betweenthe casing 21 and the object outside the casing 21 results in a changein intensity of light from light sources 28 with which the object isirradiated, which further changes the RGB values of the object obtainedfrom image capturing. Given this situation, the colorimetric camera 20according to the present embodiment is configured to calculate thedistance between the casing 21 and the object outside the casing 21through the distance calculator 58, and correct, in accordance with thecalculated distance, the RGB values of the color pattern CP output fromthe averaging processing unit 54. The colorimetric camera 20 is thusenabled to stably obtain the RGB values of the color pattern CP andcorrectly calculate colorimetric values of the color pattern CP evenwhen the above-described change in distance has occurred.

RGB values obtained for the object outside the casing 21 by capturing animage thereof approximately linearly change with the distance betweenthe casing 21 and the object. That is, RGB values of the object decreasewith increase in the distance between the casing 21 and the objectbecause this increase decreases the intensity of light from the lightsources 28 with which the object is irradiated. Therefore, correctionamount calculation parameters for use in calculating correction amountsof the RGB values of the object from the distance between the casing 21and the object may be obtained previously from an experiment or thelike. The use of these correction amount calculation parameters enablesthe first corrector 55 to calculate the correction amounts according tothe distance calculated by the distance calculator 58 and appropriatelycorrect the RGB values of the color pattern CP output from the averagingprocessing unit 54. Alternatively, a correction table or a high-orderfunction defining a correspondence relation between the distance betweenthe casing 21 and the object and correction amounts for the RGB valuesmay be obtained previously. The use of this correction table orhigh-order function enables the first corrector 55 to more accuratelycalculate the correction amounts according to the distance calculated bythe distance calculator 58 and more highly accurately correct the RGBvalues of the color pattern CP output from the averaging processing unit54. Details of a specific method for correcting the RGB values of theobject in accordance with a change in the distance between the casing 21and the object are disclosed in Japanese Patent Application Laid-openNo. 2013-228370.

The colorimetric computation unit 56 calculates colorimetric values ofthe color pattern CP, based on the RGB values of the color pattern CPcorrected by the first corrector 55 and the RGB values of the respectivereference patches of the reference chart 40. The colorimetric values ofthe color pattern CP calculated by the colorimetric computation unit 56are fed to the CPU 101 on the main control board 120. The colorimetriccomputation unit 56 can calculate the colorimetric values of the colorpattern CP by a method disclosed in, for example, Japanese PatentApplication Laid-open No. 2013-051671, and a detailed description of theprocessing by the colorimetric computation unit 56 is therefore omitted.

The non-volatile memory 57 stores therein, for example, various types ofdata needed by the colorimetric computation unit 56 for calculatingcolorimetric values of the color pattern CP.

The distance calculator 58 analyzes an image captured by the sensor unit25 and temporarily stored in the frame memory 53 to calculate thedistance between the casing 21 and the object outside the casing 21,more specifically, the distance (the size of the gap d illustrated inFIG. 6 and FIG. 7) between the bottom plate part 21 a of the casing 21and a paper surface of the recording medium M that has the color patternCP formed thereon.

FIG. 11 to FIG. 13 are views illustrating example images captured by thesensor unit 25. FIG. 11 to FIG. 13 illustrate example images captured bythe sensor unit 25 while a paper surface of the recording medium M nothaving the color pattern CP formed thereon is used as the object.

As illustrated in FIG. 11 to FIG. 13, each image Im captured by thesensor unit 25 contains a reference chart image region RC and an objectimage region RO. The reference chart image region RC is an image regionhaving an image of the reference chart 40 inside the casing 21. Theobject image region RO is an image region having an image of an objectoutside the casing 21 through the opening 23 of the casing 21, that is,an image region defined by the opening 23 of the casing 21. The objectimage region RO is obtained as an image in which low-luminance regionsRO_l indicating low luminance appear in belt-like shapes on outer sidesof a high-luminance region RO_h indicating high luminance (outer sidesin a direction perpendicular to a direction in which the reference chart40 and the opening 23 are aligned next to each other, or the upper sideand the lower side of the high-luminance region RO_h in the examples inFIG. 11 to FIG. 13).

In the image Im captured by the sensor unit 25, the reason why thelow-luminance regions RO_l appear more outside than the high-luminanceregion RO_h in the object image region RO is that, because of differentpositional relations of the sensor unit 25 and the light sources 28 withthe opening 23 of the casing 21, regions each not illuminated by one ofthe two light sources 28 appear in outside-facing parts of the imagingrange for the object outside the casing 21 an image of which is capturedby the sensor unit 25. Here, the size of the object image region RO inthe image Im captured by the sensor unit 25 does not change because thesensor unit 25 and the light sources 28 are immovably provided to thecasing 21 having the opening 23. However, the ratio of the size of thelow-luminance regions RO_l in the object image region RO to the size ofthe high-luminance region RO_h therein changes with the distance betweenthe casing 21 and the object outside the casing 21.

The image Im illustrated in FIG. 12 represents an example image capturedby the sensor unit 25 with the distance between the casing 21 and theobject (a paper surface of the recording medium M) outside the casing 21being shorter than in the image Im illustrated in FIG. 11. As isapparent from comparison between the image Im illustrated in FIG. 12 andthe image Im illustrated in FIG. 11, the ratio of the size of thelow-luminance regions RO_l in the object image region RO to the size ofthe high-luminance region RO_h therein is smaller when the distancebetween the casing 21 and the object outside the casing 21 is shorter.

The image Im illustrated in FIG. 13 represents an example image capturedby the sensor unit 25 with the distance between the casing 21 and theobject (a paper surface of the recording medium M) outside the casing 21being longer than in the image Im illustrated in FIG. 11. As is apparentfrom comparison between the image Im illustrated in FIG. 13 and theimage Im illustrated in FIG. 11, the ratio of the size of thelow-luminance regions RO_l in the object image region RO to the size ofthe high-luminance region RO_h therein is larger when the distancebetween the casing 21 and the object outside the casing 21 is longer.

As described above, in the image Im captured by the sensor unit 25, theratio of the size of the low-luminance regions RO_l in the object imageregion RO to the size of the high-luminance region RO_h therein takes avalue depending on the distance between the casing 21 and the objectoutside the casing 21. Therefore, the distance between the casing 21 andthe object outside the casing 21 can be calculated by obtaining theratio of the size of the low-luminance regions RO_l in the object imageregion RO to the size of the high-luminance region RO_h therein.

The distance calculator 58 calculates the distance between the casing 21and the object outside the casing 21 in the following manner, forexample. Specifically, the distance calculator 58 extracts the objectimage region RO from the image Im captured by the sensor unit 25 andtemporarily stored in the frame memory 53. The distance calculator 58then, for example, performs binarization using a certain threshold onthe extracted object image region RO, thereby generating a binarizedimage having white pixels in place of the high-luminance region RO_h andblack pixels in place of the low-luminance regions RO_l in the extractedobject image region RO.

Subsequently, the distance calculator 58 counts the number of whitepixels and the number of black pixels in the generated binarized imagein a direction perpendicular to the direction in which the referencechart image region RC and the object image region RO are aligned next toeach other in the image Im, and calculates the ratio of the number ofblack pixels to the number of white pixels as the ratio of the size ofthe low-luminance regions RO_l to the size of the high-luminance regionRO_h. In the colorimetric camera 20 according to the present embodiment,as described above, the two light sources 28 are arranged, uniformlywith respect to the center of the lens 25 b of the sensor unit 25, inthe direction perpendicular to the direction in which the opening 23 andthe reference chart 40 are aligned next to each other. For this reason,on condition that there is no relative tilt between the casing 21 andthe object, more specifically, that the bottom plate part 21 a of thecasing 21 and the paper surface of the recording medium M having thecolor pattern CP formed thereon are maintained parallel to each other,the low-luminance regions RO_l in the object image region RO appear inthe same size on the opposite sides of the high-luminance region RO_h inthe direction perpendicular to the direction in which the referencechart image region RC and the object image region RO are aligned next toeach other in the image Im. Therefore, counting of the number of whitepixels and the number of black pixels may be performed only for half thesize of the object image region RO, that is, from the center of theobject image region RO in a direction toward one of the low-luminanceregions RO_l.

After thus calculating the ratio of the size of the low-luminanceregions RO_l in the object image region RO to the size of thehigh-luminance region RO_h therein, the distance calculator 58calculates, based on the obtained ratio, the distance between the casing21 and the object outside the casing 21. Three options are considered,depending on the positional relation of the opening 23 of the casing 21with the light sources 28, as a method for calculating the distancebetween the casing 21 and the object outside the casing 21 based on theratio of the size of the low-luminance regions RO_l to the size of thehigh-luminance region RO_h. These three calculation methods areindividually described below.

Distance Calculation Method 1

FIG. 14 is a diagram explaining a method for calculating the distancebetween the casing 21 and the object outside the casing 21 based on theratio of the size of the low-luminance regions RO_l to the size of thehigh-luminance region RO_h, and illustrates a case where each of thelight sources 28 is mounted on the circuit board 24 in a statepositioned immediately above an edge portion of the opening 23.

As illustrated in FIG. 14, the position of the light source 28 isdenoted as M; the center position of the lens 25 b of the sensor unit 25as A; the position of the lower edge of the opening 23 as B; theintersection of the extended line of a line segment AB with the objectas C; the intersection of a straight line drawn toward the object fromthe center position A of the lens 25 b perpendicularly to the object(the optical axis of the sensor unit 25) with a line that passes throughthe position B of the lower edge of the opening 23 and is parallel tothe object as D; the intersection of the extended line of a line segmentAD with the object as E; and the intersection of a straight line drawnfrom the position M of the light source 28 and passing through theposition B of the lower edge of the opening 23 with the object as F. Inthis case, if the length of the line segment AD and the length of theline segment DE are denoted as L1 and L2, respectively, L2 is thedistance between the casing 21 and the object, which is a length desiredto be obtained. If the length of the line segment CF and the length ofthe line segment FE are denoted as X and Y, respectively, X/Ycorresponds to the ratio of the size of the low-luminance regions RO_lto the size of the high-luminance region RO_h.

As is apparent from FIG. 14, the value of Y remains unchanged and equalsto the length of the line segment BD whether or not the value of L2, orthe distance between the casing 21 and the object, changes. In contrast,the value of X changes in such a manner as to be smaller when the valueof L2 is smaller and be larger when the value of L2 is larger.Therefore, the value of L2, or the distance between the casing 21 andthe object, can be found by finding X/Y, or the ratio of the size of thelow-luminance regions RO_l to the size of the high-luminance regionRO_h.

In FIG. 14, X:L2=Y:L1 because a right-angled triangle BCF and aright-angled triangle ABD are homologous with each other. This impliesthat X×L1=L2×Y, which can be transformed into X/Y=L2/L1. Here, the valueof L1 is an invariable value determined by a position at which thesensor unit 25 is installed. Therefore, the value of L2, or the distancebetween the casing 21 and the object, can be found by finding X/Y, orthe ratio of the size of the low-luminance regions RO_l to the size ofthe high-luminance region RO_h.

Distance Calculation Method 2

FIG. 15 is a diagram explaining another method for calculating thedistance between the casing 21 and the object outside the casing 21based on the ratio of the size of the low-luminance regions RO_l to thesize of the high-luminance region RO_h, and illustrates a case whereeach of the light sources 28 is mounted on the circuit board 24 in astate displaced toward the lens 25 b of the sensor unit 25 from aposition immediately above an edge portion of the opening 23.

As illustrated in FIG. 15, the position of the light source 28 isdenoted as M; the center position of the lens 25 b of the sensor unit 25as A; the position of the lower edge of the opening 23 as B; theintersection of the extended line of a line segment AB with the objectas C; the intersection of a straight line drawn toward the object fromthe center position A of the lens 25 b perpendicularly to the object(the optical axis of the sensor unit 25) with a straight line thatpasses through the position B of the lower edge of the opening 23 and isparallel to the object as D; the intersection of the extended line of aline segment AD with the object as E; the intersection of a straightline drawn toward the object from the position B of the lower edge ofthe opening 23 perpendicularly to the object with the object as F; theintersection of a straight line drawn from the light source 28 andpassing through the position B of the lower edge of the opening 23 withthe object as G; the intersection of a straight line drawn toward a linesegment BD from the position M of the light source 28 perpendicularly tothe line segment BD with the line segment BD as I; the intersection ofthe extended line of a line segment MI with a line segment FE as J; andthe intersection of a straight line that passes through the centerposition A of the lens 25 b and is parallel to the line segment BD withthe extended line of a line segment IM as K. In this case, if the lengthof the line segment AD, the length of a line segment DE, and the lengthof the line segment KM are denoted as L1, L2, and L3, respectively, L2is the distance between the casing 21 and the object, which is a lengthdesired to be obtained. If the length of a line segment CG and thelength of a line segment GE are denoted as X′ and Y′, respectively,X′/Y′ corresponds to the ratio of the size of the low-luminance regionsRO_l to the size of the high-luminance region RO_h.

As is apparent from FIG. 15, when the value of L2, or the distancebetween the casing 21 and the object, is 0, the value of X′ is 0, andthe value of Y′ is Y, which is equal to the length of the line segmentBD. In addition, when the value of L2 is increased, the value of X′increases in proportion to the increase of the value of L2, and thevalue of Y′ also increases in proportion thereto. Therefore, the valueof L2, or the distance between the casing 21 and the object, can befound by finding X′/Y′, or the ratio of the size of the low-luminanceregions RO_l to the size of the high-luminance region RO_h.

In FIG. 15, the length of a line segment GF is denoted as k. Here,(X′+k):L2=Y:L1 because a right-angled triangle BCF and a right-angledtriangle ABD are homologous with each other. Therefore, the relation canbe expressed as X′=(Y×L2/L1)−k. At the same time, Y′=Y+k.

Here, the value of k is desired to be obtained. The length of a linesegment BI is denoted as m. In this case, m:(L1−L3)=k:L2 because aright-angled triangle MBI and a right-angled triangle BGF are homologouswith each other. Therefore, the relation can be expressed ask=L2×m/(L1−L3). Here, m/(L1−L3) is a constant that is uniquelydetermined by layout. If this constant, m/(L1−L3) is denoted as α, therelation can be expressed as k=α×L2.

Therefore, X′=(Y×L2/L1)−α×L2 and Y′=Y+α×L2 are obtained.X′=(Y×L2/L1)−α×L2 can be transformed into another expressionX′=L2((Y/L1)−α). Here, Y/L1 is also a constant that is uniquelydetermined by layout. Therefore, if Y/L1 is denoted as β, the equationcan be also expressed as X′=L2(β−α).

X′/Y′=L2(β−α)/Y+α×L2 is thus obtained. As described above, α=m/(L1−L3)and β=Y/L1 are constants that are uniquely determined by layout,individually. Therefore, the value of L2, or the distance between thecasing 21 and the object, can be found by finding X′/Y′, or the ratio ofthe size of the low-luminance regions RO_l to the size of thehigh-luminance region RO_h.

Distance Calculation Method 3

FIG. 16 is a diagram explaining another method for calculating thedistance between the casing 21 and the object outside the casing 21based on the ratio of the size of the low-luminance regions RO_l to thesize of the high-luminance region RO_h, and illustrates a case whereeach of the light sources 28 is mounted on the circuit board 24 in astate displaced toward the side wall part 21 c from a positionimmediately above an edge portion of the opening 23.

As illustrated in FIG. 16, the position of the light source 28 isdenoted as M; the center position of the lens 25 b of the sensor unit 25as A; the position of the lower edge of the opening 23 as B; theposition of the upper edge of the opening 23 as H; the intersection ofthe extended line of a line segment AB with the object as C; theintersection of a straight line drawn toward the object from the centerposition A of the lens 25 b perpendicularly to the object (the opticalaxis of the sensor unit 25) with a line that passes through the positionB of the lower edge of the opening 23 and is parallel to the object asD; the intersection of the extended line of a line segment AD with theobject as E; the intersection of a straight line drawn toward the objectfrom the position B of the lower edge of the opening 23 perpendicularlyto the object with the object as F; the intersection of a straight linedrawn from the position M of the light source 28 and passing through theposition H of the upper edge of the opening 23 with the object as G′;the intersection of a line segment HG′ with a line segment BD as I; theintersection of a straight line drawn toward the object from theintersection I perpendicularly to the object with the object as J; theintersection of a straight line drawn toward the bottom plate part 21 aof the casing 21 from the position M of the light source 28perpendicularly to the bottom plate part 21 a with the bottom plate part21 a as O; and the intersection of a straight line that passes throughthe center position A of the lens 25 b and is parallel to the linesegment BD with the extended line of a line segment OM as K. In thiscase, if the length of the line segment AD and the length of a linesegment DE are denoted as L1 and L2, respectively, L2 is the distancebetween the casing 21 and the object, which is a length desired to beobtained. If the length of a line segment BI and the length of a linesegment ID are denoted as x and y, respectively, while the length of aline segment CG′ and the length of a line segment G′E are denoted as X″and Y″, respectively, X″/Y″ corresponds to the ratio of the size of thelow-luminance regions RO_l to the size of the high-luminance regionRO_h.

As is apparent from FIG. 16, when the value of L2, or the distancebetween the casing 21 and the object, is 0, the value of X″ is x, andthe value of Y″ is y. In addition, the value of X″ increases from x inproportion to an increase of the value of L2, and the value of Y″increases from y in proportion thereto. Therefore, the value of L2, orthe distance between the casing 21 and the object, can be found byfinding X″/Y″, or the ratio of the size of the low-luminance regionsRO_l to the size of the high-luminance region RO_h.

The size of x is desired to be obtained in the first place. In FIG. 16,the length of a line segment HB (the thickness of the bottom plate part21 a), the length of a line segment MO, and the length of a line segmentOH are denoted as a, b, and c. In this case, (L1−L3−a):a=c:x because aright-angled triangle MOH and a right-angled triangle HBI are homologouswith each other. Therefore, the relation can be expressed asx=a×c/(L1−L3−a). Here, X″=x and Y″=y when L2=0. Therefore, if the lengthof the line segment BD is denoted as d,X″/Y″=x/y={a×c/(L1−L3−a)}/{d−a×c/(L1−L3−a)} is obtained. Here,{a×c/(L1−L3−a)}/{d−a×c/(L1−L3−a)} is an invariable value because thevalues of L1, L3, a, b, c, and d are values that are determined bylayout. Therefore, when X″/Y″, or the ratio of the size of thelow-luminance regions RO_l to the size of the high-luminance regionRO_h, takes this value, it is found that L2=0.

The size of a line segment CF and the size of a line segment FG′ aredesired to be obtained next. In FIG. 16, the length of the line segmentCF and the length of the line segment FG′ are denoted as e and f,respectively. In this case, L1:d=L2:e because a right-angled triangleABD and a right-angled triangle BCF are homologous with each other.Therefore, the relation can be expressed as e=d×L2/L1. In addition,a:x=L2:(f−x) because a right-angled triangle HBI and a right-angledtriangle IJG′ are homologous with each other. Therefore, the relationcan be expressed as f=x×(a+L2)/a.

Here, CG′=CF+FG′ holds, and the foregoing relation can be expressed asX″=d×L2/L1+x×(a+L2)/a=L2×(d/L1+x/a)+x. Here, (d/L1+x/a) is a constantthat is uniquely determined by layout. If this constant, (d/L1+x/a), isdenoted as α, the relation can be expressed as X″=L2×α+x.

Furthermore, in relation to obtaining the value of (X″+Y″),d:L1=(X″+Y″):(L1+L2) because a right-angled triangle ABD and aright-angled triangle ACE are homologous with each other. Therefore, therelation can be expressed as X″+Y″=d×(L1+L2)/L1=L2×d/L1+d. Here, d/L1 isa constant that is uniquely determined by layout. If this constant,d/L1, is denoted as β, the relation can be expressed as X″+Y″=L2×β+d.Therefore, the relation can be expressed asY″=L2×β+d−X″=L2×β+d−(L2×α+x).

X″/Y″=(L2×α+x)/{L2×β+d−(L2×α+x)} is thus obtained. Here, α=d/L1+x/a andβ=d/L1 are, as described above, constants that are uniquely determinedby layout, individually. The value of x and the value of d are alsovalues that are uniquely determined by layout. Therefore, the value ofL2, or the distance between the casing 21 and the object, can be foundby finding X″/Y″, or the ratio of the size of the low-luminance regionsRO_l to the size of the high-luminance region RO_h.

Other Methods

The above descriptions assume that the distance between the casing 21and the object outside the casing 21 is calculated based on the ratio ofthe size of the low-luminance regions RO_l in the object image region ROto the size of the high-luminance region RO_h therein. However, the sizeof the low-luminance regions RO_l and the size of the high-luminanceregion RO_h linearly change (in the example in the FIG. 14, only thesize of the low-luminance regions RO_l changes) with the distancebetween the casing 21 and the object, as described above. For thisreason, a correspondence table indicating the relation of the size ofthe low-luminance regions RO_l or of the high-luminance region RO_h withthe distance between the casing 21 and the object may be previouslyproduced, and the distance between the casing 21 and the object may becalculated by use of this correspondence table.

In this case, the above correspondence table is produced in such amanner that: images are captured through the sensor unit 25 with thedistance between the casing 21 and the object being sequentiallychanged; and the size of the low-luminance regions RO_l or of thehigh-luminance region RO_h obtained by analyzing the captured images areassociated with the distance between the casing 21 and the object at thetime of capturing each of the images. The correspondence table is storedin the non-volatile memory 57 (an example of a first table retainingunit) or the like. Thereafter, when calculating the distance between thecasing 21 and the object, the distance calculator 58 acquires the sizeof the low-luminance regions RO_l or of the high-luminance region RO_hby analyzing an image captured by the sensor unit 25, and calculates,with reference to the correspondence table retained by the non-volatilememory 57, the distance between the casing 21 and the object thatcorresponds to the acquired size of the low-luminance regions RO_l or ofthe high-luminance region RO_h.

The distance between the casing 21 and the object calculated by thedistance calculator 58 is, as described above, passed on to the firstcorrector 55 and used in the first corrector 55 for correcting the RGBvalues (color information on the high-luminance region RO_h) of thecolor pattern CP. Inconveniences such as instability of the RGB valuesof the color pattern CP due to changes in the distance between thecasing 21 and the object are thus eliminated, so that highly accuratecolorimetry can be carried out.

Operation

Distance measuring operation that the colorimetric camera 20 accordingto the present embodiment performs is briefly described next. FIG. 17 isa flowchart illustrating the procedure of distance measurement that thecolorimetric camera 20 according to the present embodiment performs.

When the distance between the casing 21 and the object outside thecasing 21 is measured, the colorimetric camera 20 according to thepresent embodiment first causes the light source drive controllers 51 toturn on the light sources 28 (Step S101). The sensor unit 25 thencaptures an image with the light sources 28 on (Step S102). An image Imcaptured by the sensor unit 25 and output from the sensor unit 25 isstored in the frame memory 53.

Subsequently, the distance calculator 58 extracts the object imageregion RO from the image Im captured by the sensor unit 25 and stored inthe frame memory 53 (Step S103). The distance calculator 58 thencalculates the ratio of the size of the low-luminance regions RO_l tothe size of the high-luminance region RO_h, for example, by performingprocessing such as binarization on the extracted object image region ROand counting of the number of black pixels and the number of whitepixels (Step S104). The distance calculator 58 then calculates thedistance between the casing 21 and the object based on the calculatedratio (Step S105), and passes on the calculated distance to the firstcorrector 55. This ends the distance measuring operation of thecolorimetric camera 20 according to the present embodiment.

Advantageous Effects of Embodiment

As described above in detail with specific examples given, thecolorimetric camera 20 according to the present embodiment is configuredto calculate the distance between the casing 21 and the object outsidethe casing 21 based on the ratio of the size of the low-luminanceregions RO_l in the object image region RO contained in the image Imcaptured by the sensor unit 25 to the size of the high-luminance regionRO_h therein. The need for providing a mark portion for distancemeasurement on the light-permeable member as is done in conventionaltechniques is thus eliminated, and the distance between the casing 21and the object can be measured easily and conveniently.

The colorimetric camera 20 according to the present embodiment isfurther configured to correct, in accordance with the calculateddistance, the RGB values of the color pattern CP obtained from imagecapturing by the sensor unit 25. The inconvenience of instability of theRGB values of the color pattern CP due to changes in the distancebetween the casing 21 and the object thus can be effectively prevented.The colorimetric camera 20 according to the present embodiment isfurther configured to calculate, based on the RGB values of the colorpattern CP corrected in accordance with the calculated distance,colorimetric values of the color pattern CP. Colorimetry for the colorpattern CP thus can be highly accurately performed.

In the image forming apparatus 100 according to the present embodiment,color adjustment in which the ejection amounts of ink to be ejected ontothe recording medium M from the recording heads 6 are adjusted by use ofcolorimetric values of the color pattern CP calculated by thecolorimetric camera 20 according to the present embodiment, or the RGBvalues of the color pattern CP. Thus, images can be recorded with highreproducibility through appropriate color adjustment.

Modifications

The above embodiment assumes that the casing 21 of the colorimetriccamera 20 and the object are kept not tilting relatively to each other.However, for example, a margin of error in the attachment of thecolorimetric camera 20, a certain condition of the recording medium M,or the like may sometimes prevent the object from being parallel(horizontal) with the bottom plate part 21 a of the casing 21 of thecolorimetric camera 20 and cause a relative tilt therebetween. In thiscase, the intensity of light from the light sources 28 with which theobject is irradiated changes in accordance with the tilt, so that theRGB values of the object obtained from image capturing change. Giventhis situation, the above-described colorimetric camera 20 may beprovided additionally with the function of calculating the relative tiltbetween the casing 21 and the object. The colorimetric camera 20 may befurther configured to correct the RGB values (color information on thehigh-luminance region RO_h) of the color pattern CP in accordance withthe relative tilt between the casing 21 and the object.

FIG. 18 is a block diagram illustrating a functional configurationexample of the colorimetric camera 20 according to this modification.This configuration illustrated in FIG. 18 is obtained by adding a tiltcalculator 59 and a second corrector 60 to the configuration illustratedin FIG. 10.

The tilt calculator 59 analyzes an image captured by the sensor unit 25and temporarily stored in the frame memory 53 to calculate the relativetilt between the casing 21 and the object, more specifically, the tiltbetween the bottom plate part 21 a of the casing 21 and a paper surfaceof the recording medium M that has the color pattern CP formed thereon.

The tilt calculator 59 extracts, from an image Im captured by the sensorunit 25 and temporarily stored in the frame memory 53, an object imageregion RO containing a high-luminance region RO_h and low-luminanceregions RO_l, and generates a binarized image by performing binarizationon the object image region RO, for example, as in the case of thedistance calculator 58 described above. The tilt calculator 59 thencounts, in the image Im, the numbers of black pixels appearing in therespective opposite ends of the binarized image in a directionperpendicular to a direction in which a reference chart image region RCand the object image region RO are aligned next to each other. If thedifference between the counted numbers of black pixels in the respectiveopposite ends of the binarized image exceeds a certain threshold (thatis, if the size of one of the low-luminance regions RO_l and the size ofthe other low-luminance region RO_l are significantly different fromeach other), the tilt calculator 59 determines that there is a relativetilt caused between the casing 21 and the object.

Upon determining that there is a relative tilt caused between the casing21 and the object, the tilt calculator 59 further counts the number ofwhite pixels in the above-described binarized image in the samedirection as it has counted the numbers of black pixels, and calculatesthe ratio of the number of black pixels to the number of white pixels asthe ratio of the size of the low-luminance regions RO_l to the size ofthe high-luminance region RO_h. The tilt calculator 59 then calculatesthe relative tilt between the casing 21 and the object based on theratio of the size of the low-luminance regions RO_l in the object imageregion RO to the size of the high-luminance region RO_h therein. Aspecific example of a method for calculating the tilt from the ratio ofthe size of the low-luminance regions RO_l to the size of thehigh-luminance region RO_h is described later in detail.

After the tilt calculator 59 calculates the relative tilt between thecasing 21 and the object, the second corrector 60 further corrects, inaccordance with the calculated tilt, the RGB values of the color patternCP that have been corrected by the first corrector 55. Correction amountcalculation parameters for use in calculating correction amounts of theRGB values of the object from the size of the relative tilt between thecasing 21 and the object may be obtained previously from an experimentor the like. The use of these correction amount calculation parametersenables the second corrector 60 to appropriately correct the RGB valuesof the color pattern CP. Alternatively, a correction table or ahigh-order function defining a correspondence relation between the sizeof the relative tilt between the casing 21 and the object and correctionamounts for the RGB values may be obtained previously. The use of thiscorrection table or high-order function enables the second corrector 60to more accurately calculate the correction amounts according to thetilt calculated by the tilt calculator 59 and more highly accuratelycorrect the RGB values of the color pattern CP.

A specific example of a method for calculating the tilt from the ratioof the size of the low-luminance regions RO_l to the size of thehigh-luminance region RO_h is described with reference to FIG. 19. FIG.19 illustrates a case where, with each of the light sources 28 mountedon the circuit board 24 in a state positioned immediately above an edgeportion of the opening 23 as in the case illustrated in FIG. 14, theobject tilts θ degrees from the bottom surface part 21 a of the casing21.

When the object is horizontal (parallel with the bottom surface part 21a of the casing 21), the value of L2, or the distance between the casing21 and the object, can be obtained by the Distance Calculation Method 1.In contrast, when the object tilts θ degrees from the bottom surfacepart 21 a of the casing 21, L2 in FIG. 19 is the average of a distanceL3 calculated based on the size of one of the two low-luminance regionsRO_l and a distance L4 calculated based on the size of the otherlow-luminance region RO_l under the assumption that the object haslinearity in the imaging range, as expressed by Mathematical Formula(1):L2=(L3+L4)/2  (1)Here, in FIG. 19, the ranges of the low-luminance regions RO_l andranges of the high-luminance region RO_h when the object is horizontalwith respect to the bottom surface part 21 a of the casing 21 aredenoted as x1, x2, y1, and y2, respectively; and the ranges of thelow-luminance regions RO_l (a line segment AP and a line segment QB inFIG. 19) and ranges of the high-luminance region RO_h (a line segment POand a line segment OQ) when the object tilts θ degrees from the bottomsurface part 21 a of the casing 21 are denoted as x1′, x2′, y1′, andy2′, respectively.

In FIG. 19, a line with a slope α that is drawn from the center of thelens 25 b and passes through the position of a lower edge of the opening23 in the left-hand side of the illustration can be expressed byMathematical Formula (2):y=(L1/y1)×(L1+L2)  (2)where the intersection of a perpendicular line drawn toward the bottomsurface part 21 a of the casing 21 from the center of the lens 25 b ofthe sensor unit 25 perpendicularly to the bottom surface part 21 a withthe object is set as the origin O; the leftward and rightward directionsin the illustration are set as direction of x; and upward and downwarddirections are set as directions of y.

In addition, a line with a slope θ that passes through the origin O canbe expressed by Mathematical Formula (3):y=−tan θ×x  (3)The intersection A(x,y) can be obtained by solving Mathematical Formula(2) and Mathematical Formula (3) given above. The y coordinate A(y) ofthis intersection A is the distance L3. Let us consider a line thatpasses through this intersection A and is parallel to the bottom surfacepart 21 a of the casing 21. If the range of the low-luminance regionRO_l and the range of the high-luminance region RO_h are denoted as x1″and y1″, respectively, x1″ and y1″ can be expressed by MathematicalFormula (4):x1″=|A(x)|−|y1| and y1″=y1  (4)

With x1″ and y1″ in Mathematical Formula (4) given above and θ, theabove variables x1′ and y1′ can be obtained as Mathematical Formula (5):x1′=x1″/cos θ, and y1′=y1″/cos ƒ  (5)

From Mathematical Formula (4) and Mathematical Formula (5) given above,x1′ and y1′ can be expressed by Mathematical Formula (6):x1′=(|A(x)|−|y1|)/cos θ and y1′=y1/cos θ  (6)

From Mathematical Formula (6) given above, the apparent ratio(x1′:y1′=line segment AP: line segment PO) of the low-luminance regionRO_l to the high-luminance region RO_h in the image can be expressed byMathematical Formula (7):x1′:y1′=(|A(x)|−|y1|)/cos θ:y1/cos θ  (7)

Here, A(x) is a function of θ obtained by Mathematical Formula (2) andMathematical Formula (3) given above, so that θ can be obtained byfinding x1′:y1′. When θ is sufficiently small, approximations ofA(x)=x1+y1 and B(x)=x2+y2 are possible. Therefore, the processes forobtainment from the intersection with Mathematical Formula (2) can besimplified.

In the foregoing descriptions, the relative tilt between the casing 21and the object is calculated based on the ratio of the size of thelow-luminance region RO_l in the object image region RO to a size of thehigh-luminance region RO_h therein. However, a correspondence tableindicating the relation of the sizes of the low-luminance regions RO_lor the high-luminance region RO_h with the relative tilt between thecasing 21 and the object may be previously produced, and the relativetilt between the casing 21 and the object may be calculated by use ofthis correspondence table.

In this case, the above correspondence table is produced in such amanner that: images are captured through the sensor unit 25 with thedistance between the casing 21 and the object being sequentially changedand with the relative tilt between the casing 21 and the object beingsequentially changed with respect to each distance therebetween; and thesize of the low-luminance regions RO_l or of the high-luminance regionRO_h obtained by analyzing the captured images is associated with therelative tilt between the casing 21 and the object at the time ofcapturing each of the images. The correspondence table is stored in thenon-volatile memory 57 (an example of a second table retaining unit) orthe like. Thereafter, when calculating the relative tilt between thecasing 21 and the object, the tilt calculator 59 acquires the size ofthe low-luminance regions RO_l or of the high-luminance region RO_h byanalyzing an image captured by the sensor unit 25, and calculates, withreference to the correspondence table retained by the non-volatilememory 57, the relative tilt between the casing 21 and the object thatcorresponds to the acquired size of the low-luminance regions RO_l or ofthe high-luminance region RO_h.

The relative tilt between the casing 21 and the object calculated by thetilt calculator 59 is, as described above, passed on to the secondcorrector 60 and used in the second corrector 60 for correcting the RGBvalues (color information on the high-luminance region RO_h) for thecolor pattern CP. Inconveniences such as instability of the RGB valuesof the color pattern CP due to changes in the relative tilt between thecasing 21 and the object are thus eliminated, so that highly accuratecolorimetry can be carried out.

Although the colorimetric camera 20 has the function of calculating thecolorimetric values of the colorimetric patterns CP in the aboveembodiment, the colorimetric values of the colorimetric patterns CP maybe calculated outside the colorimetric camera 20. For example, the CPU101 or the controlling FPGA 110 mounted on the main control board 120 ofthe image forming apparatus 100 can be configured to calculate thecolorimetric values of the color pattern CP. In this case, thecolorimetric camera 20 is configured to feed the RGB values of the colorpattern CP obtained from image capturing by the sensor unit 25 and theRGB values of the respective reference patches included in the referencechart 40 to the CPU 101 or the controlling FPGA 110, instead of feedingthereto the colorimetric values of the color pattern CP. In other words,the colorimetric camera 20 is configured as an image capturing apparatuswithout the function of calculating colorimetric values.

Although the above embodiment illustrates the image forming apparatus100 configured as a serial head type inkjet printer, the presentinvention is not limited to the above example and can be effectivelyapplied to various types of image forming apparatuses. For example, whenthe present invention is applied to a line head type inkjet printer, aplurality of colorimetric cameras 20 may be arranged next to one anotherin a direction perpendicular to a conveyance direction of the recordingmedium M. Otherwise, when the present invention is applied to anelectrophotographic image forming apparatus, a plurality of colorimetriccameras 20 may be arranged next to one another in a directionperpendicular to a conveyance direction of the recording medium M at anyposition in a conveyance path of the recording medium M through whichthe recording medium M is conveyed at least after fixation. Inparticular, in the case of performing colorimetry (acquisition of RGBvalues) on the color pattern CP using a plurality of colorimetriccameras 20 with the recording medium M being conveyed, it is desirablethat the color pattern CP be formed as a patch having a shape elongatedin the conveyance direction of the rerecording medium M.

FIG. 20 is an external view of an electrophotographic image formingapparatus 200 configured as a production printer. The image formingapparatus 200 illustrated in FIG. 20 includes a main body unit 201 thatelectrophotographically forms images on recording media M by using toneras color material. The image forming apparatus 200 has a configurationobtained by combining peripheral equipment with this main body unit 201in accordance with the intended purpose. The peripheral equipmentincludes, for example, a large-capacity paper feeding unit 202 thatfeeds paper, an inserter 203 that is used for feeding cover sheets, afolding unit 204 that applies a folding process to recording media M onwhich images have been formed, a finisher 205 that performs stapling,punching, and the like, and a cutting machine 206 that performs cutting.An external controller 300 called a digital front end (DFE) is connectedto this image forming apparatus 200.

In the electrophotographic image forming apparatus 200 thus configured,a plurality of colorimetric cameras 20 are arranged, for example, in aconveyance path of recording media M inside the finisher 205 so as to bealigned next to one another in a direction perpendicular to a conveyancedirection of recording media M. FIG. 21 is a diagram explaining anexample of arrangement of the colorimetric cameras 20 in this case. Inthe example illustrated in FIG. 21, eight colorimetric cameras 20 arelinearly arranged in a direction perpendicular to a conveyance directionof recording media M.

When the main body unit 201 conveys a recording medium M having thecolor pattern CP formed thereon, these colorimetric cameras 20 cause thesensor units 25 to capture images thereof at the timing when the colorpattern CP arrives at positions facing the openings 23 provided in thecasings 21, thereby acquiring RGB values of the color pattern CP, forexample. The colorimetric cameras 20 then feed the RGB values of thecolor pattern CP acquired in the image capturing by the sensor units 25or colorimetric values of the color pattern CP calculated based on theseRGB values to the main body unit 201. In the main body unit 201, amountsof toner to be attached to the recording medium M are adjusted (colorsare adjusted) by use of the RGB values of the color pattern CP or thecolorimetric values of the color pattern CP that have been fed from thecolorimetric cameras 20. In the case of a configuration in whichrecording media M need to be sufficiently cooled inside the main bodyunit 201 after fixing, the colorimetric cameras 20 are arranged, in aconveyance path of recording media M inside the main body unit 201 afterthe cooling, next to one another in a direction perpendicular to aconveyance direction of recording media M.

In a case where a plurality of colorimetric cameras 20 are linearlyarranged next to one another in a direction perpendicular to aconveyance direction of recording media M as illustrated in FIG. 21,light from the light sources 28 of adjacent ones of the colorimetriccameras 20 overlap each other as illustrated in FIG. 22 when thesecolorimetric cameras 20 cause the distance calculators 58 or the tiltcalculators 59 to simultaneously perform the above-described distancecalculation or the above-described tilt calculation. This may result ininaccurate calculation of the ranges of the above-describedlow-luminance regions RO_l, further resulting in inappropriatecalculation of the distances and the tilts. Given this situation, in aconfiguration having a plurality of colorimetric cameras 20 linearlyarranged next to one another in a direction perpendicular to aconveyance direction of recording media M, it is desirable that adjacentones of the colorimetric cameras 20 cause the distance calculators 58 orthe tilt calculators 59 to perform the distance calculation or the tiltcalculation at different timing.

For example, a configuration in which a plurality of linearly arrangedcolorimetric cameras 20 perform the distance calculation or the tiltcalculation one after another in sequence as illustrated in FIG. 23prevents overlapping of light from the light sources 28 of adjacent onesof the colorimetric cameras 20, thereby enabling appropriate calculationof the distances and the tilts. Another configuration in which those notadjacent to each other of a plurality of colorimetric cameras 20simultaneously perform the distance calculation or the tilt calculationas illustrated in FIG. 24 is more efficient than a configuration inwhich the colorimetric cameras 20 perform the distance calculation orthe tilt calculation one after another in sequence. Still anotherconfiguration is extremely efficient in which, as illustrated in FIG.25, with a plurality of linearly arranged colorimetric cameras 20 beingidentified with numbers the sequence of which agrees with the sequencein which the colorimetric cameras 20 are arranged, the colorimetriccameras identified with odd numbers (1, 3, 5, etc.) and the colorimetriccameras identified with even numbers (2, 4, 6, etc.) alternatelycalculate the distances or the tilts. This is because calculation of thedistances and the tilts in all of the colorimetric cameras 20 can becompleted with two times of the calculation no matter how manycolorimetric cameras 20 are included.

Control functions of the units included in the image forming apparatuses100 and 200 and each of the colorimetric cameras 20 (image capturingapparatuses) in the above embodiment and modifications can beimplemented by hardware, software, or a combined configuration usingboth hardware and software. When the control functions of the unitsincluded in the image forming apparatuses 100 and 200 and thecolorimetric camera 20 (image capturing apparatus) are implemented bysoftware, processors included in the image forming apparatuses 100 and200 and the colorimetric camera 20 (image capturing apparatus) executecomputer programs having processing sequences written therein. Each ofthe computer programs to be executed by the processors is, for example,embedded and provided in a ROM or the like inside a corresponding one ofthe image forming apparatuses 100 and 200 and the colorimetric camera 20(image capturing apparatus). A computer program to be executed by anyone of the processors may be recorded and provided in a non-transitorycomputer-readable recording medium such as a compact disc read-onlymemory (CD-ROM), a flexible disk (FD), a compact disc recordable (CD-R),or a digital versatile disc (DVD), as an installable or executable file.A computer program to be executed by any one of the processors may bestored in a computer connected to a network such as the Internet andprovided by being downloaded over the network. A computer program to beexecuted by the processor may be provided or distributed over a networksuch as the Internet.

The method steps, processes, or operations described herein are not tobe construed as necessarily requiring their performance in theparticular order discussed or illustrated, unless specificallyidentified as an order of performance or clearly identified through thecontext. It is also to be understood that additional or alternativesteps may be employed.

Further, any of the above-described apparatus, devices or units can beimplemented as a hardware apparatus, such as a special-purpose circuitor device, or as a hardware/software combination, such as a processorexecuting a software program. Further, as described above, any one ofthe above-described and other methods of the present invention may beembodied in the form of a computer program stored in any kind of storagemedium. Examples of storage mediums include, but are not limited to,flexible disk, hard disk, optical discs, magneto-optical discs, magnetictapes, nonvolatile memory, semiconductor memory, read-only-memory (ROM),etc. Alternatively, any one of the above-described and other methods ofthe present invention may be implemented by an application specificintegrated circuit (ASIC), a digital signal processor (DSP) or a fieldprogrammable gate array (FPGA), prepared by interconnecting anappropriate network of conventional component circuits or by acombination thereof with one or more conventional general purposemicroprocessors or signal processors programmed accordingly.

According to the embodiments of the present invention, the effect ofenabling easy and convenient measurement of the distance between acasing and an object can be obtained.

The above-described embodiments are illustrative and do not limit thepresent invention. Thus, numerous additional modifications andvariations are possible in light of the above teachings. For example, atleast one element of different illustrative and exemplary embodimentsherein may be combined with each other or substituted for each otherwithin the scope of this disclosure and appended claims. Further,features of components of the embodiments, such as the number, theposition, and the shape are not limited the embodiments and thus may bepreferably set. It is therefore to be understood that within the scopeof the appended claims, the disclosure of the present invention may bepracticed otherwise than as specifically described herein.

What is claimed is:
 1. An image capturing apparatus, comprising: acasing having an opening; a light source arranged inside the casing; asensor arranged inside the casing and configured to capture, through theopening, an image of an object positioned outside the casing while thelight source is on, wherein the casing shades at least part of lightemitted from the light source to an outside of the casing via theopening so that low-luminance regions are formed in the image; andprocessing circuitry configured to calculate a distance between thecasing and the object, based on the image that has been captured by thesensor, the image including, within an image region of the objectdefined by the opening, a high-luminance region and the low-luminanceregions located on outer sides of the high-luminance region.
 2. Theimage capturing apparatus according to claim 1, wherein, based on aratio of a size of the low-luminance regions to a size of thehigh-luminance region, the processing circuitry is configured tocalculate the distance.
 3. The image capturing apparatus according toclaim 1, further comprising: a memory storing a first correspondencetable indicating a correspondence relation between a size of thelow-luminance regions or of the high-luminance region and the distance,wherein based on the size of the low-luminance regions or of thehigh-luminance region and the first correspondence table, the processingcircuitry is configured to calculate the distance.
 4. The imagecapturing apparatus according to claim 1, wherein the processingcircuitry is further configured to correct color information on thehigh-luminance region, based on the calculated distance.
 5. The imagecapturing apparatus according to claim 1, wherein the processingcircuitry is further configured to calculate a relative tilt between thecasing and the object, based on the image.
 6. The image capturingapparatus according to claim 5, wherein, based on a ratio of a size ofthe low-luminance regions to a size of the high-luminance region, theprocessing circuitry is configured to calculate the tilt.
 7. The imagecapturing apparatus according to claim 5, further comprising: a memorystoring a second correspondence table indicating a correspondencerelation between a size of the low-luminance regions or of thehigh-luminance region and the tilt, wherein based on the size of thelow-luminance regions or of the high-luminance region and the secondcorrespondence table, the processing circuitry is configured tocalculate the tilt.
 8. The image capturing apparatus according to claim5, wherein the processing circuitry is further configured to correctcolor information on the high-luminance region, based on the calculatedtilt.
 9. The image capturing apparatus according to claim 1, wherein theprocessing circuitry is further configured to calculate colorimetricvalues of the object, based on color information on the high-luminanceregion.
 10. An image forming apparatus comprising the image capturingapparatus according to claim
 1. 11. The image forming apparatusaccording to claim 10, wherein a plurality of the image capturingapparatuses are arranged next to one another in a directionperpendicular to a conveyance direction of recording media, and inadjacent ones of the image capturing apparatuses, at least thecalculation of the distances is performed at different timing.
 12. Adistance measuring method to be performed by an image capturingapparatus including a casing having an opening, a light source arrangedinside the casing, and a sensor arranged inside the casing andconfigured to capture, through the opening, an image of an objectpositioned outside the casing while the light source is on, wherein thecasing shades at least part of light emitted from the light source to anoutside of the casing via the opening so that low-luminance regions areformed in the image, the distance measuring method comprising:calculating a distance between the casing and the object, based on theimage captured by the sensor, the image including, within an imageregion of the object defined by the opening, a high-luminance region andthe low-luminance regions located on outer sides of the high-luminanceregion.
 13. A non-transitory computer-readable recording medium thatcontains a computer program for causing an image capturing apparatus toimplement a method, the image capturing apparatus including a casinghaving an opening, a light source arranged inside the casing, and asensor arranged inside the casing and configured to capture, through theopening, an image of an object present outside the casing while thelight source is on, wherein the casing shades at least part of lightemitted from the light source to an outside of the casing via theopening so that low-luminance regions are formed in the image, themethod comprising: calculating a distance between the casing and theobject, based on the image captured by the sensor, the image including,within an image region of the object defined by the opening, ahigh-luminance region and the low-luminance regions located on outersides of the high-luminance region.